﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Maticsoft.Web
{
    public partial class shownew : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
                {                    
                    int nid = (Convert.ToInt32(Request.Params["id"]));
                    ShowInfo(nid);
                }
            }
        }

        private void ShowInfo(int nid)
        {
            Maticsoft.BLL.newsinfo bll = new Maticsoft.BLL.newsinfo();
            Maticsoft.Model.newsinfo model = bll.GetModel(nid);
            lbltitle.Text = model.ntitle;
            this.Title = model.ntitle;
            lblcontent.Text = model.ncontent;
            lbltime.Text = model.ntime.ToString();            
        }
    }
}